<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="/Public/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="/Public/assets/css/font-awesome.min.css" />
		<!--[if IE 7]>
		  <link rel="stylesheet" href="/Public/assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
		<link rel="stylesheet" href="/Public/assets/css/ace.min.css" />
		<link rel="stylesheet" href="/Public/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="/Public/assets/css/ace-skins.min.css" />
        <link rel="stylesheet" href="/Public/Css/style.css"/>
		<!--[if lte IE 8]>
		  <link rel="stylesheet" href="/Public/assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="/Public/assets/js/ace-extra.min.js"></script>
		<!--[if lt IE 9]>
		<script src="/Public/assets/js/html5shiv.js"></script>
		<script src="/Public/assets/js/respond.min.js"></script>
		<![endif]-->
		<script src="/Public/Js/jquery-1.9.1.min.js"></script>        
        <script src="/Public/assets/layer/layer.js" type="text/javascript"></script>
<title>登陆</title>
</head>

<body class="login-layout Reg_log_style">
<div class="logintop">    
    <span>欢迎24小时快递后台管理界面平台</span>    
    <ul>
    <li><a href="http://www.erdangjiade.com">返回首页</a></li>
    <li><a href="http://www.erdangjiade.com">帮助</a></li>
    <li><a href="http://www.erdangjiade.com">关于</a></li>
    </ul>    
    </div>
    <div class="loginbody">
<div class="login-container">
	<div class="center">
	     <img src="" />
							</div>

							<div class="space-6"></div>

							<div class="position-relative">
								<div id="login-box" class="login-box widget-box no-border visible">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header blue lighter bigger">
												<i class="icon-coffee green"></i>
												24小时跨地管理员登陆
											</h4>

											<div class="login_icon"><img src="/Public/Images/login.png" /></div>

											<form class="">
												<fieldset>
										<ul>
   <li class="frame_style form_error"><label class="user_icon"></label><input name="用户名" type="text"  id="username"/><i>用户名</i></li>
   <li class="frame_style form_error"><label class="password_icon"></label><input name="密码" type="password"   id="userpwd"/><i>密码</i></li>
   <li class="frame_style form_error"><label class="Codes_icon"></label><input name="验证码" type="text"   id="Codes_text"/><i>验证码</i><div class="Codes_region"></div></li>
   
  </ul>
													<div class="space"></div>

													<div class="clearfix">
														<label class="inline">
															<input type="checkbox" class="ace" id='rememberMe'>
															<span class="lbl">保存密码</span>
														</label>

														<button type="button" class="width-35 pull-right btn btn-sm btn-primary" id="login_btn">
															<i class="icon-key"></i>
															登陆
														</button>
													</div>

													<div class="space-4"></div>
												</fieldset>
											</form>

											<div class="social-or-login center">
												<span class="bigger-110">通知</span>
											</div>

											<div class="social-login center">
											本网站系统不再对IE8以下浏览器支持，请见谅。
											</div>
										</div><!-- /widget-main -->

										<div class="toolbar clearfix">
											

											
										</div>
									</div><!-- /widget-body -->
								</div><!-- /login-box -->
							</div><!-- /position-relative -->
						</div>
                        </div>
                        <div class="loginbm">版权所有  2016  <a href="http://www.erdangjiade.com">二当家的软件源码分享</a> </div><strong></strong>
</body>
</html>
<script>
$('#login_btn').on('click', function(){
	     var num=0;
		 var str="";
     $("input[type$='text'],input[type$='password']").each(function(n){
          if($(this).val()=="")
          {
               
			   layer.alert(str+=""+$(this).attr("name")+"不能为空！\r\n",{
                title: '提示框',				
				icon:0,								
          }); 
		    num++;
            return false;            
          } 
		 });
		  if(num>0){  return false;}	 	
          else{
			  //管理员登录
			  var name			=	$('#username').val();
			  var pwd			=	$('#userpwd').val();
			  var verifyCode	=	$('#Codes_text').val();
			  var rememberMe	=	$('#rememberMe').is(':checked');
			  $.post("<?php echo U('Index/checkLogin');?>", {name:name,pwd:pwd,rememberMe:rememberMe,verifyCode:verifyCode}, function(response) {
					//alert(response.status);
					if(response.status==200){ 
						layer.alert('登陆成功！',{
								   title: '提示框',				
								   icon:1,		
								  });
								  <!-- location.href="index.html"; -->
					    location.href=response.callback;
						layer.close(index);	
						
					}
				}, 'json');		
			  
		  }		  		     						
		
	});
  $(document).ready(function(){
	 $("input[type='text'],input[type='password']").blur(function(){
        var $el = $(this);
        var $parent = $el.parent();
        $parent.attr('class','frame_style').removeClass(' form_error');
        if($el.val()==''){
            $parent.attr('class','frame_style').addClass(' form_error');
        }
    });
	$("input[type='text'],input[type='password']").focus(function(){		
		var $el = $(this);
        var $parent = $el.parent();
        $parent.attr('class','frame_style').removeClass(' form_errors');
        if($el.val()==''){
            $parent.attr('class','frame_style').addClass(' form_errors');
        } else{
			 $parent.attr('class','frame_style').removeClass(' form_errors');
		}
		});
	  })

</script> 
		<!-- 管理员注册 -->
		<script type="text/javascript">
			 $('#registerButton').click(function(){
				var reg_name		=	$('#reg_name').val();
				var reg_pwd			=	$('#reg_pwd').val();
				var reg_email		=	$('#reg_email').val();
				var reg_phone		=	$('#reg_phone').val();
				// Send the request
				$.post("<?php echo U('Index/register');?>", {name:reg_name,pwd:reg_pwd,email:reg_email,phone:reg_phone}, function(response) {
					//alert(response.status);
					if(response.status==200){
						alert('注册成功');
						//location.href=response.callback;
					}
				}, 'json');
			 });
		</script>
		<!-- 管理员找回密码 -->
		<script type="text/javascript">
			 $('#forgetButton').click(function(){
				var reclam_pwd_phone = $('reclam_pwd_phone').val;
				var reclam_pwd_name = $('reclam_pwd_name').val;
				// Send the request
				$.post("<?php echo U('Index/forget_pwd');?>", {reclam_pwd_name:reclam_pwd_name,reclam_pwd_phone:reclam_pwd_phone}, function(response) {
					//alert(response.status);
					if(response.status==200){
						alert('发送成功,请注意查收');
						//location.href=response.callback;
					}
				}, 'json');
			 });
		</script>